
import React ,{ useState ,useEffect} from 'react';
import style from "./RegisterFinish.module.scss";
import {FieldTimeOutlined} from '@ant-design/icons'
import {registerGetStateApi} from '../../http/userApi'


function RegisterFinish() {
    const listMsg = [{
        time:'',
        msg:''
    }]

    //设置获取的状态响应式数据
    const [listData ,setListData] = useState(listMsg)

    useEffect( () => {
        registerGetStateApi()
            .then(res=>{
                console.log(res.data)
                if(res.data.code == 200){
                    setListData(res.data.data)
                }
                console.log(listData)
            })

    },[])

    const Li = listData.map(item=> <li className={style.li}>
        <div  className={style.time_text}>{item.time}</div>
        <div className={style.context_text}>{item.context}</div>
    </li>)


    return (
        <div>
            <div className={style.header_box}>
                <div className={style.left_box}>
                    <div className={style.left_img}>
                        <img src="https://img2.baidu.com/it/u=4244269751,4000533845&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1658077200&t=a28d40f78e87978de20e20e477c6d8f1" ></img>
                    </div>
                    <div className={style.left_text}  >廖氏美业平台管理系统</div>
                </div>
                <div>
                </div>
            </div>
            <div className={style.main}>
                <div className={style.icon}>
                    <FieldTimeOutlined style={{fontSize:'80px',color:"#777"}}/>
                </div>
                <div className={style.msg}>您的入驻信息已提交，会在3个工作日内审核完毕</div>
                <ul className={style.ul}>
                    <li className={style.li}>
                        <div  className={style.time}>时间</div>
                        <div className={style.context}>说明</div>
                    </li>
                    {Li}
                    {/*<li className={style.li}>*/}
                    {/*    <div  className={style.time_text}>2020-09-01  17:00</div>*/}
                    {/*    <div className={style.context_text}>您提交审核</div>*/}
                    {/*</li>*/}
                </ul>
            </div>
        </div>
    )
}

export default RegisterFinish;